import { defineStore } from 'pinia'

const useCounterStore = defineStore('counter', {
  state: () => ({
    count: 0,
  }),
  getters: {
    double: (state) => state.count * 2,
  },
  actions: {
    changeCount(newCount: number) {
        this.count = newCount
    }
  },
})

export default useCounterStore
